package com.feng.util;

import java.util.List;

public class PageUtil<T> {

	 private int firstIndex;
     private int pageSize=5;
     private int pageNum=1;
     private int totalPageCount;
     private int totalDataCount;
     private List<T> list;
     private String type;
     
     public void initTotalPageCount(){
    	 if(totalDataCount%pageSize==0){
    		 totalPageCount=totalDataCount/pageSize;
    	 }else{
    		 totalPageCount=totalDataCount/pageSize+1;
    	 }
    	 firstIndex=(pageNum-1)*pageSize;
     }
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public int getFirstIndex() {
		return firstIndex;
	}
	public void setFirstIndex(int firstIndex) {
		this.firstIndex = firstIndex;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getPageNum() {
		return pageNum;
	}
	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}
	public int getTotalPageCount() {
		return totalPageCount;
	}
	public void setTotalPageCount(int totalPageCount) {
		this.totalPageCount = totalPageCount;
	}
	public int getTotalDataCount() {
		return totalDataCount;
	}
	public void setTotalDataCount(int totalDataCount) {
		this.totalDataCount = totalDataCount;
	}
	public List<T> getList() {
		return list;
	}
	public void setList(List<T> list) {
		this.list = list;
	}

}
